The present invention relates to a storage device employing a flash memory. More particularly, it relates to a method of extending the service life of such a storage device.
A magnetic storage device is the most commonly used prior-art auxiliary storage for information equipment. With the magnetic storage device, a file to be written thereinto is divided into a data storing unit called a xe2x80x9csectorxe2x80x9d, and it is stored in correspondence with the physical position of a storage medium. That is, in rewriting a certain file, the data of the file are written into basically the same position. Herein, when the quantity of data to be written has increased, new sectors are used for the increased data. Also, an optical disk storage device is mentioned as another auxiliary storage. The optical disk storage device which is conventional in the art at present can write data thereinto only once, and cannot erase data therefrom. In rewriting a file written once, accordingly, an actual rewriting operation is not performed, but the data of the file are written into a different part of the storage area. The data of the file written before are invalidated so as not to be read out thenceforth. That is, unlike the magnetic disk storage device, the optical disk storage device fulfills the function of the auxiliary storage in accordance with the scheme that the rewritten data and the locations thereof are not correlated at all.
In recent years, a semiconductor file storage device has been designated for use as an auxiliary storage, which employs a semiconductor memory in contrast to the above storage devices in each of which a disk is rotated to access the data of large capacity at high speed. In particular, a device employing a nonvolatile memory which is electrically rewritable (hereinbelow, expressed as the xe2x80x9cEEPROMxe2x80x9d short for electrically erasable and programmable read-only memory) will form the mainstream of the semiconductor file storage device in the future.
A technique which concerns the storage device employing the EEPROM is disclosed in the official gazette of Japanese Pat. Application Laid-open No. 25798/1991. This technique is intended to realize a practical storage device by the use of the EEPROM in spite of the drawback of the EEPROM which limits the number of rewriting erase operations. To sum up, a plurality of memory elements (EEPROM elements) are prepared, and the number of rewriting erase operations of the individual elements are recorded and managed. When one of the memory elements has reached a prescribed number of operations below the guaranteed number of rewrite operations of the EEPROM, it is changed-over to another memory element, which is then used for storing data. Thus, the stored data are protected.
The prior-art storage devices mentioned above will be discussed further.
According to the scheme of the optical disk storage device, each time the file is rewritten, the part of the storage area corresponding thereto is ruined. This incurs the problem that a satisfactory storage area cannot be secured without a storage medium having a very large capacity. Especially in the case of the storage device of the information equipment in which the files are frequently rewritten, the required storage area increases even when the actual capacity for storing the data of the files is not very large.
On the other hand, with the magnetic disk storage device which is the most commonly used as the auxiliary storage, when the file written once is to be rewritten, advantageously the new data are written into the same part of a storage area. In the application of such a rewriting operation to the EEPROM, however, a file (usually called xe2x80x9cdirectory filexe2x80x9d) for listing the stored data files, a file (xe2x80x9cfile allocation tablexe2x80x9d) for referring to the locations of the data files, etc. need to be rerecorded at each access for writing data, so that the rewriting operations concentrate locally. As a result, the EEPROM which has a limited number of writing erase operations has its service life shortened drastically.
The technique utilizing the EEPROM as disclosed in the official gazette of Japanese Pat. Application Laid-open No. 25798/1991, consists of the scheme whereby the deteriorated state of the memory element is grasped in terms of the number of erase operations, whereupon the memory element is changed-over to the substitutive memory element before being ruined. This scheme necessitates a memory capacity which is, at least, double the actual capacity for storing the data of files. That is, the substitutive memory element is not used at all until the memory element used first is ruined. Besides, the ruined memory element is then quite unnecessary. These conditions render the physical volume and weight of the storage device very wasteful. Moreover, since all the data of the memory element are not usually rewritten, it is uneconomical that the memory chip having been only partly deteriorated is entirely brought into the state of nonuse.
It is accordingly desired to realize a semiconductor file storage device which has a longer service life and which is smaller in size and more economical.
Meanwhile, a DRAM (dynamic random access memory) or an SRAM (static random access memory) has been employed as the storage medium of a semiconductor disk storage device. Also, a flash memory has been known as one sort of EEPROM.
With the flash memory, data can be read therefrom in small data units, such as in bytes or word units, as in the case of the DRAM or the SRAM. Since, however, the flash memory is limited in the number of rewrite operations, data are written thereinto by reducing the number of rewrite operations in such a way that a rewriting unit is set at a block unit such as of 512 bytes.
Also, it is structurally required of the flash memory to erase data before the rewriting operation. Therefore, some flash memory devices are endowed with the command process functions of xe2x80x9cerasexe2x80x9d etc.
Anyway, the limited number of rewrite operations is the most serious problem in the case where the flash memory is employed as the storage medium of a semiconductor disk storage device. Since a directory area and an FAT (file allocation table) area, for example, are rewritten more frequently than the other areas, only the specified blocks of the flash memory for the directory and FAT areas are more liable to exceed the limit of rewrite operations of the flash memory. Consequently, the whole semiconductor disk becomes unusable due to the abnormalities of only the specified blocks, and the semiconductor disk is of low reliability on account of the short service life thereof.
It is accordingly desired to realize a semiconductor disk storage device which has a longer service life.
An object of the present invention is to provide a storage device employing a flash memory, which has a longer service life and which is smaller in size and more economical then conventional storage devices.
Another object of the present invention is to extend the service life of a semiconductor disk storage device employing a flash memory.
In one aspect of performance of the present invention, a storage device employing a flash memory comprises a storage area which is divided into physical areas that are identified by physical area identification information; logical area conversion means supplied with logical area identification information being virtual identification information in an operation of writing data, for converting the logical area identification information into the physical area identification information corresponding thereto in the case of writing the data into a logical area; and a memory controller which receives the physical area identification information resulting from the conversion, and which writes the data into the physical area; the logical area conversion means being capable of converting the identical logical area identification information into the plurality of items of physical area identification information.
In operation, when the physical area into which the data is to be written is normal, the memory controller writes the data into this physical area. On the other hand, when the physical area is abnormal, the memory controller writes the data into another of the physical areas based on the logical area identification information.